int fixed_width;
guint visible : 1;
+ guint resizable : 1;
GMenuModel *menu;
PROP_SORTER,
PROP_VISIBLE,
PROP_HEADER_MENU,
+ PROP_RESIZABLE,
PROP_FIXED_WIDTH,
N_PROPS
g_value_set_object (value, self->menu);
break;
+ case PROP_RESIZABLE:
+ g_value_set_boolean (value, self->resizable);
+ break;
+
case PROP_FIXED_WIDTH:
g_value_set_int (value, self->fixed_width);
break;
gtk_column_view_column_set_header_menu (self, g_value_get_object (value));
break;
+ case PROP_RESIZABLE:
+ gtk_column_view_column_set_resizable (self, g_value_get_boolean (value));
+ break;
+
case PROP_FIXED_WIDTH:
gtk_column_view_column_set_fixed_width (self, g_value_get_int (value));
break;
G_TYPE_MENU_MODEL,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
+ /**
+ * GtkColumnViewColumn:resizable:
+ *
+ * Whether this column is resizable
+ */
+ properties[PROP_RESIZABLE] =
+ g_param_spec_boolean ("resizable",
+ P_("Resizable"),
+ P_("Whether this column is resizable"),
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
+
/**
* GtkColumnViewColumn:fixed-width:
*
self->minimum_size_request = -1;
self->natural_size_request = -1;
self->visible = TRUE;
+ self->resizable = FALSE;
self->fixed_width = -1;
}
return self->menu;
}
+/**
+ * gtk_column_view_column_set_resizable:
+ * @self: a #GtkColumnViewColumn
+ * @resizable: whether this column should be resizable
+ *
+ * Sets whether this column should be resizable by dragging.
+ */
+void
+gtk_column_view_column_set_resizable (GtkColumnViewColumn *self,
+ gboolean resizable)
+{
+ g_return_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self));
+
+ if (self->resizable == resizable)
+ return;
+
+ self->resizable = resizable;
+
+ g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_RESIZABLE]);
+}
+
+/**
+ * gtk_column_view_get_resizable:
+ * @self: a #GtkColumnView
+ *
+ * Returns whether this column is resizable.
+ *
+ * Returns: %TRUE if this column is resizable
+ */
+gboolean
+gtk_column_view_column_get_resizable (GtkColumnViewColumn *self)
+{
+ g_return_val_if_fail (GTK_IS_COLUMN_VIEW_COLUMN (self), TRUE);
+
+ return self->resizable;
+}
+
/**
* gtk_column_view_column_set_fixed_width:
* @self: a #GtkColumnViewColumn